1. Field of the Invention
This invention relates to data stores used for storing, retrieving, or updating records and more particularly relates to conducting a lock free read of those records.
2. Description of the Related Art
The use of data stores for data archive and manipulation is ubiquitous. It is conceivable that in the near future, the vast majority of businesses will rely on at least one form of a data store to bank their records. Because these data stores are relied on so heavily by businesses, the need for accurate and reliable reading of the records is essential. While the use of data stores is increasing, there are still problems associated with reading the vital records they store. Although the integrity of data stores has been progressed by applying ACID (Atomicity, Consistency, Isolation, and Durability) properties, these properties do not impose restrictions regarding read queries. As a result, several problems exist with read queries directed to a data store.
For example, under the lock based “read committed” isolation level, a request to read a record that is currently being written to may result in a deadlock. The “read committed” isolation level does not require a query to hold a lock on the record for the duration of its transaction. However, it is required to hold a lock on the record for a short duration or at least test the record for an available lock. As a result, multiple concurrent transactions executing under this isolation level may result in problems such as deadlocks.
“Repeatable read” is another isolation level that locks a record when it executes a transaction. This lock remains for the duration of the transaction. Because the lock is held for a longer period, a query to access the record may result in a timeout or even a deadlock.
Attempts have been made to remedy these consequences of data store access. One such remedy is a “snapshot” isolation level. The “snapshot” isolation level returns an image of the data store as it existed at a specific point in time. Because strict restrictions are not imposed on read requests, stale versions of the data store can be returned as an acceptable solution so long as all updates occur on the latest version. Multiple versions of the data store are typical retained with the “snapshot” isolation level; however, as more versions are stored, this remedy becomes more complex and is detrimental to system performance.
From the foregoing discussion, it should be apparent that a need exists for a method that conducts a lock free read. Beneficially, such a method would provide a simplistic solution to prevent deadlocks and timeouts when accessing data records and be less inhibiting on system performance than current solutions.